package com.share.user.api;

import com.share.user.bean.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

/**
 * author:caifan
 * date:2019/4/28
 */
@RequestMapping("/rest/user")
@FeignClient(name = "user")
public interface UserApi {
    @GetMapping(value = "/name")
    String getUsername(@RequestParam("username")String username);

    @GetMapping(value = "/birth")
    User getUserByBirth(@RequestParam("birth") Date birth);
}
